#ifndef PRIVATECHATWINDOW_H
#define PRIVATECHATWINDOW_H

#include <QtGui/QMainWindow>

namespace Ui {
    class PrivateChatWindow;
}

class PrivateChatWindow : public QMainWindow {
    Q_OBJECT
public:
    PrivateChatWindow(const QString &friend_loginName, QWidget *parent = 0);
    ~PrivateChatWindow();

    inline const QString &getParticipantLoginName(){ return myFriend_loginName; }
    void addChatMessage(const QString &from, const QString &message);

protected:
    void changeEvent(QEvent *e);
    void closeEvent(QCloseEvent *event);

private:
    Ui::PrivateChatWindow *m_ui;
    QString myFriend_loginName;

signals:
    void sendMessageToFriend(const QString &friend_loginName, const QString &message);
    void privateChatWindowClose(const QString &friend_loginName);

private slots:
    void on_pbSenden_clicked();
    void on_teMessage_returnWithoutShiftPressed();
};

#endif // PRIVATECHATWINDOW_H
